[pull] main from MetaMask:main#365
Merged
Merged
Conversation
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** Adds the mUSD conversion education screen to our conversion flow. This screen is only displayed once to the user for now upon entering the mUSD conversion flow. <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: add mUSD conversion education screen on first visit to conversion flow ## **Related issues** Fixes: [MUSD-98: Create mUSD conversion education screen](https://consensyssoftware.atlassian.net/browse/MUSD-98) ## **Manual testing steps** ```gherkin Feature: mUSD Conversion Education Screen Scenario: user wants to learn more about converting their stablecoins to mUSD Given user is on the token list screen Given user hasn't seen the education screen yet When user clicks "Convert" CTA next to a supported stablecoin (e.g. USDC) Then user is redirected to the education screen. When user clicks "Continue" on education screen Then user is redirected to the mUSD conversion input screen Given user has seen the education screen yet When user clicks "Convert" CTA next to a supported stablecoin (e.g. USDC) Then user is redirected to the mUSD conversion input screen ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** The user is immediately redirected to the conversion input screen <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> https://github.com/user-attachments/assets/a4b8dbb5-e6f0-4307-9f4e-ded1d5ea4e40 ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Introduces an mUSD conversion education screen and gating, with Redux state to mark completion, navigation/routes, and integration into the Convert flow. > > - **Earn UI**: > - Add `EarnMusdConversionEducationView` (screen, styles, image) shown before the first mUSD conversion. > - New navbar helper `getCloseOnlyNavbar` for a close-only header. > - **State/Redux**: > - Add `SET_MUSD_CONVERSION_EDUCATION_SEEN` action, `musdConversionEducationSeen` flag in `user` reducer, selector `selectMusdConversionEducationSeen`. > - **Hooks/Logic**: > - Update `useMusdConversion` to expose `hasSeenMusdEducationScreen` and factor `navigateToConversionScreen`. > - Update `StakeButton` to route to education screen if `musdConversionEducationSeen` is false before initiating conversion. > - **Navigation**: > - Add route `Routes.EARN.MUSD.CONVERSION_EDUCATION` and register in `EarnScreenStack`. > - **i18n**: > - Add strings under `earn.musd_conversion.education`. > - **Tests**: > - Add comprehensive tests for the new education view, navbar helper, selectors, and updated `StakeButton` behavior. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit b5b087a. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
…n navigation (#23321) ## **Description** This PR implements a pending trade configuration storage system that automatically saves the user's trade form state when they navigate away from the trade screen and restores it when they return within 5 minutes. ## **Changelog** CHANGELOG entry: Added automatic saving and restoration of trade form configuration when navigating away from the perps trading screen ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/TAT-2049 ## **Manual testing steps** ```gherkin Feature: Pending trade configuration storage Scenario: User navigates away and returns to trade screen Given user is on the perps trade screen with BTC selected And user has configured: amount=100, leverage=5x, take profit=50000, stop loss=40000, limit price=45000, order type=limit When user navigates away from the trade screen (e.g., to positions tab) And user returns to the trade screen within 5 minutes Then the trade form should be restored with the previously configured values And amount should be 100 And leverage should be 5x And take profit should be 50000 And stop loss should be 40000 And limit price should be 45000 And order type should be limit Scenario: Pending configuration expires after 5 minutes Given user is on the perpetuals trade screen with BTC selected And user has configured: amount=100, leverage=5x When user navigates away from the trade screen And more than 5 minutes pass And user returns to the trade screen Then the trade form should NOT be restored with pending config And form should use default values or saved configuration instead ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** N/A ### **After** https://github.com/user-attachments/assets/d40af1f4-1670-4d5d-b13d-f43794ab5529 ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Introduces per-market pending trade config auto-saved on navigation (expires after 5 minutes) and restored in the order form, with controller APIs, selector, hook integration, and tests. > > - **Perps Controller**: > - Add `tradeConfigurations[network][coin].pendingConfig` (amount, leverage, TP/SL, limit, `orderType`, `timestamp`). > - New APIs: `savePendingTradeConfiguration`, `getPendingTradeConfiguration` (auto-expire/cleanup after 5 min), `clearPendingTradeConfiguration`. > - Extend action types; update state typing. > - **Selectors**: > - Add `selectPendingTradeConfiguration` with 5-minute expiry handling. > - **Hooks/UI**: > - New `usePerpsSavePendingConfig(orderForm)` to auto-save pending config on blur/unmount. > - `usePerpsOrderForm`: initialize from pending config (priority over saved config), restore fields, and default `orderType`/amount/leverage accordingly. > - `PerpsOrderView`: integrate `usePerpsSavePendingConfig`. > - **Tests**: > - Add comprehensive tests for pending config save/get/expire/clear and network scoping. > - Add selector tests for pending config. > - Update `PerpsOrderView.test` to mock focus effect and controller pending-config methods. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 6a0b44a. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
…current values (#23203) ## **Description** Adds the maximum resources available along the existing current values for Tron resources: Energy + Bandwidth ## **Changelog** CHANGELOG entry: Added maximum Energy and maximum Bandwidth in TRX asset details ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/NWNT-748?atlOrigin=eyJpIjoiZjlkMWQ3OTQ5MzY1NDlkYWJmNjdkZGEzYzZkNTRhNWUiLCJwIjoiaiJ9 ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** ### **Before** <img width="1320" height="2868" alt="image" src="https://github.com/user-attachments/assets/4b538e5d-e710-4989-85da-faa7b33a5845" /> ### **After** <img width="413" height="193" alt="Screenshot 2025-11-25 at 12 06 17" src="https://github.com/user-attachments/assets/fd32bfd2-f203-4508-bbfb-af728a90341b" /> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Shows current and max Tron Energy/Bandwidth with correct progress and pluralized coverage, powered by a new useTronResources hook; updates tests and i18n. > > - **UI (Tron asset overview)**: > - Display `current/max` for `energy` and `bandwidth` with muted max text and ring `progress` from `percentage`. > - Pluralized coverage messages for USDT/TRX transfers based on counts. > - **Hook**: `useTronResources` > - Builds normalized `energy`/`bandwidth` objects: `{ current, max, percentage }` from `selectTronResourcesBySelectedAccountGroup`. > - Parses balances (handles commas), derives max from base caps, bounds percentage to 0–100. > - **Tests**: > - New `useTronResources.test.ts` covering parsing, capping, and percentages. > - Updated `TronEnergyBandwidthDetail.test.tsx` to assert `current/max`, pluralization, and fixed ring progress values. > - **i18n**: > - Replace `sufficient_to_cover_*` keys with `*_transfer`/`*_transfers` variants in `locales/languages/en.json`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit b62f2e6. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Antonio Regadas <antonio.regadas@consensys.net>
## **Description** Due to the upcoming end of season 1, the onboarding flow doesn't make sense any more when there's no active season. This PR changes that so that users end up on a simplified onboarding. ## **Changelog** CHANGELOG entry: fix opt in for no rewards active season ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/RWDS-855, #23396 ## **Screenshots/Recordings** ### **After** <img width="676" height="1482" alt="image" src="https://github.com/user-attachments/assets/827f2cec-1fa3-4e80-bd88-ffc6db27a493" /> <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Introduces an alternate onboarding path that enables opt-in when no season is active by checking `hasActiveSeason`, adds `OnboardingNoActiveSeasonStep`, and extracts a reusable `RewardsLegalDisclaimer`, with tests and strings updated. > > - **Rewards Onboarding flow**: > - Check active season via `RewardsController:hasActiveSeason` in `OnboardingIntroStep`; show skeleton until resolved and branch UI. > - Factor validation into `canContinue()`; `handleNext` uses it. > - If no active season, render new simplified sign-up `OnboardingNoActiveSeasonStep` (uses `useOptin`, handles geo/loading, auto-redirects if already opted in). > - **Components**: > - New `OnboardingNoActiveSeasonStep` with custom image/background and disabled progress indicator. > - New reusable `RewardsLegalDisclaimer`; replace inline legal text in `OnboardingStep4` and reuse in no-season step. > - `OnboardingStep`: add `showProgressIndicator` prop to toggle progress bars. > - **Tests**: > - Add tests for `OnboardingNoActiveSeasonStep` and `RewardsLegalDisclaimer`. > - Update `OnboardingIntroStep` and `OnboardingStep4` tests for new season check and disclaimer usage. > - **i18n**: > - Add `rewards.onboarding.no_active_season.*` strings and related copy updates in `en.json`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 3ba9211. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
…3394) ## **Description** This PR fixes the issue where recent activity doesn't update after executing a trade or closing a position in the Perps feature. **Root Cause:** The recent activity section was fetching data via REST API only on mount, not responding to real-time WebSocket updates from trades. **Solution:** 1. Updated `usePerpsHomeData` to use WebSocket fills directly via `usePerpsLiveFills` for instant activity updates 2. Updated `usePerpsTransactionHistory` to merge WebSocket fills with REST data for the TransactionsView 3. Removed duplicate WebSocket subscriptions in `PerpsWatchlistMarkets` by passing positions/orders as props instead ## **Changelog** CHANGELOG entry: Fixed Perps recent activity not updating after trades ## **Related issues** Fixes: TAT-2036 ## **Manual testing steps** ```gherkin Feature: Perps Recent Activity Updates Scenario: User sees recent activity update after executing a trade Given user is on the Perps home screen with some USDC balance And user can see the Recent Activity section When user executes a market buy order for any asset (e.g., BTC) Then the trade appears immediately in the Recent Activity section And no page refresh or navigation is required Scenario: User sees recent activity update after closing a position Given user is on the Perps home screen with an open position And user can see the Recent Activity section When user closes the position Then the close trade appears immediately in the Recent Activity section And no page refresh or navigation is required Scenario: User sees recent activity in Transactions view Given user navigates to the Perps Transactions view And user has no recent trades When user executes a trade from the market details screen And user returns to the Transactions view Then the new trade appears at the top of the list ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- Recent activity did not update after trades without manual refresh --> ### **After** <!-- Recent activity updates instantly via WebSocket when trades execute --> https://github.com/user-attachments/assets/7f55f23f-ded3-451d-9d3c-4ae7b7d31aef ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Switches recent activity to real-time WebSocket fills (with REST merge), adds snapshot handling, removes duplicate subscriptions, and updates transforms/tests accordingly. > > - **UI/Hooks**: > - `usePerpsHomeData`: Replaces REST-only activity with `usePerpsLiveFills`, fetches REST fills once, merges/dedupes with live fills, updates loading state; continues live positions/orders; returns filtered/limited activity. > - `usePerpsTransactionHistory`: Merges live fills with REST-derived transactions, dedupes by `asset+timestamp`, keeps non-trade history; combines loading/errors. > - `PerpsMarketTradesList`: Uses `usePerpsLiveFills` (throttle 0), transforms/sorts/limits trades, updates navigation id expectations. > - `PerpsWatchlistMarkets`: Accepts `positions`/`orders` as props to avoid duplicate WebSocket subscriptions. > - `PerpsHomeView`: Passes `positions`/`orders` to watchlist component. > - **Streaming/Services**: > - Types: `SubscribeOrderFillsParams.callback` now `(fills, isSnapshot?)`. > - `PerpsStreamManager` fills channel: supports snapshot vs streaming (replace vs prepend), keeps newest-first cache. > - `HyperLiquidSubscriptionService`: forwards `isSnapshot` flag in `subscribeToOrderFills` and adjusts tests. > - **Transforms**: > - `transformFillsToTransactions`: new id format ``{orderId|fill}-{timestamp}-{index}``, support "Buy"/"Sell" directions, preserve symbol display; tests updated. > - **Tests**: > - Update/expand tests for hooks, components, services to reflect live fills, snapshot flag, new ids, and filtering/limits. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 55b49af. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Signed-off-by: dan437 <80175477+dan437@users.noreply.github.com> Co-authored-by: João <castrofjoao@gmail.com> Co-authored-by: Daniel <80175477+dan437@users.noreply.github.com> Co-authored-by: Michal Szorad <michal.szorad@consensys.net>
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> This PR removes more imports from the `swaps-controller` package, in preparation for its deprecation. Unified Swaps analytics are handled by the `bridge-controller` and the `bridge-status-controller`. ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: ## **Related issues** Related to #23125 ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Removes swaps-controller imports and legacy swaps analytics/decoding, shifting to bridge-based swaps and simplifying components and tests. > > - **RootRPCMethodsUI**: > - Remove swaps analytics/tracking hooks and related imports/props; simplify `autoSign` and dependencies. > - **Transaction Decoding (`UI/TransactionElement/utils.js`)**: > - Drop legacy SwapsController-based decoding; rely on BridgeStatusController (`decodeSwapsTx`/`decodeBridgeTx`). > - Clean up unused number/address utilities and swaps helpers. > - **Asset View**: > - Remove swaps liveness fetching/dispatch; delete `setLiveness` prop and related logic. > - Use `FIRST_PARTY_CONTRACT_NAMES.Swaps` for swap contract matching in filters. > - Minor cleanup of imports and connection. > - **Tests**: > - Remove `useSwapConfirmedEvent` tests/mocks from `Nav/Main/index.test.tsx`. > - Update Asset tests to not depend on swaps-controller mocks. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 8b52561. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
## **Description** This PR makes it so that, depending on the relevant featureflag, the hold musd ways to earn tile/card will render on the rewards dashboard. When clicking/pressing it a bottom sheet will open with information. In that bottom sheet, if the cta is clicked/pressed, the user navigates to the buy flow and the token to buy is preset to MUSD on Linea. ## **Changelog** CHANGELOG entry: feat: rewards hold musd ways to earn ## **Screenshots/Recordings** ### **After** <img width="628" height="736" alt="Screenshot-2025-11-27-13:59:41" src="https://github.com/user-attachments/assets/81947968-5ad2-4b56-b7ba-1335eaebce3e" /> <img width="663" height="377" alt="Screenshot-2025-11-27-14:00:06" src="https://github.com/user-attachments/assets/8d611243-ac4f-4539-9d8a-793c4c3eb318" /> <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Adds a feature‑flagged “Hold mUSD” earn option that opens a bottom sheet and routes to buy mUSD on Linea via Ramp using a CAIP-19 assetId, with supporting strings and tests. > > - **Rewards UI (`WaysToEarn`)** > - Add `WayToEarnType.HOLD_MUSD` tile, bottom-sheet content, and CTA handling. > - CTA uses `useRampNavigation().goToBuy` with CAIP-19 `assetId` for mUSD on Linea (built via `NETWORKS_CHAIN_ID`, `getDecimalChainId`, `toCaipAssetType`). > - Gate rendering with `FeatureFlagNames.rewardsEnableMusdHolding`; include filtering and modal wiring. > - Minor: use `useMemo` for computed `musdAssetId`. > - **Feature Flags** > - Introduce `rewardsEnableMusdHolding` in `FeatureFlagNames`. > - **Localization** > - Add `rewards.ways_to_earn.hold_musd.*` strings (title, descriptions, sheet, CTA). > - **Tests** > - Expand `WaysToEarn.test.tsx` with mocks for Ramp/navigation/utils and assertions for Hold mUSD visibility, modal, and correct `assetId`; verify integration with Swap/Bridge hook and metrics. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit b07c200. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** This fix ensures that: Cancelled E2E tests (like in https://github.com/MetaMask/metamask-extension/actions/runs/19671799841/job/56346000935) will now cause all-jobs-pass to fail Skipped E2E tests (unexpected) will also cause failures <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Updates CI to accept skipped E2E jobs as passing and fail the final gate on failure or cancelled results. > > - **CI workflow (`.github/workflows/ci.yml`)**: > - **Final gate logic (`check-all-jobs-pass`)**: > - Treat E2E results: accept `success` and `skipped`; fail on `failure` or `cancelled` for `e2e-smoke-tests-android`, `e2e-smoke-tests-ios`, and `e2e-smoke-tests-android-flask`. > - Refactors checks to read job results into variables and adds clarifying comments. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit a696f12. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** The trending tokens feature had the following issues: - Trending results were not scoped to popular networks which led to having some results from chains which we could not even filter on - Search API results were never scoped to some specific chains -> Now we scope to only popular chains - Filtering logi was not centralized <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: fix trending tokens inconsistencies in search results ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-1866 ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <img width="209" height="413" alt="image" src="https://github.com/user-attachments/assets/47c424cb-f03a-40a8-9c88-d4f0a67fb0eb" /> <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Scopes trending and search to popular networks using a centralized filter (with explicit exclusions) and updates UI/tests accordingly. > > - **Hooks**: > - **`usePopularNetworks`**: > - Adds `EXCLUDED_NETWORKS` and filters out unsupported/testnet/custom networks; ensures Ethereum then Linea ordering. > - **`useTrendingRequest` / `useSearchRequest`**: > - Default `chainIds` to `usePopularNetworks()` when not provided; stabilize requests and states. > - **`useTrendingSearch`**: > - Passes `chainIds` through to both search and trending requests. > - **UI**: > - **`TrendingTokenNetworkBottomSheet`**: Uses `usePopularNetworks()` directly (removes local exclusions). > - **Tests**: > - Expand coverage for excluded networks and defaults; mock `usePopularNetworks`; streamline `TrendingView` tests with selector helper and updated assertions. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 4a2981d. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
## **Description** This resolves balance update issues when switching accounts. This was uncovered when users send funds (via send or swap flow) between accounts. Examples of issues are in this notion testing doc. The underlying issue: 1. WS only runs on the selected account, so any balance changes on other accounts (e.g. sending funds to other accounts) are not captured. 2. WS also causes polling mechanisms to take up to 5 mins per cycle. So users would need to wait 5 mins for the update. 3. We also don't have a "pull down to refresh" which could allow users to manually update their balances. NOTE - this is only impacting RC builds. https://www.notion.so/metamask-consensys/Balance-Update-Slowness-lack-of-updates-2b7f86d67d688038a072ed99af7967e7 ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 5. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: fix: balance updates when switching accounts ## **Related issues** Fixes: ## **Manual testing steps** **Swap Flow** 1. Swap tokens (either multichain swap or single chain swap) 2. Make sure the receiver is a second account. 6. Wait for swap/bridge to complete 7. Go to home screen. Expected - source account balance and tokens should update 8. Switch to the second account. Expected - destination account balance and tokens should update ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** https://www.loom.com/share/08ca2be3e16c441d856c60d39135f476 ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Make token balance polling account-group aware and refactor tests to verify restart and argument propagation. > > - **Asset polling**: > - Update `useTokenBalancesPolling` to include `selectedAccountGroupId` in polling input, causing polling to restart on account-group changes and be passed to `TokenBalancesController.startPolling`. > - **Tests**: > - Refactor `useTokenBalancesPolling.test.ts` to use shared helpers and `initialRootState`. > - Add assertions that `selectedAccountGroupId` is propagated and that polling restarts when it changes. > - Maintain behavior: polls with derived or overridden `chainIds`; does not poll when no networks are available; ensures stop is called on unmount. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit b2d4b35. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->
## **Description**
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry: null
## **Related issues**
Fixes:
## **Manual testing steps**
```gherkin
Feature: my feature name
Scenario: user [verb for user action]
Given [describe expected initial app state]
When user [verb for user action]
Then [describe expected outcome]
```
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<!-- [screenshots/recordings] -->
### **After**
<!-- [screenshots/recordings] -->
## **Pre-merge author checklist**
- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Upgrade @metamask/network-controller to v27 with related dependency
updates and adjust TransactionController init to handle the new network
state type.
>
> - **Dependencies**:
> - Bump `@metamask/network-controller` to `^27.0.0`.
> - Align peers: `@metamask/controller-utils` → `^11.16.0`,
`@metamask/eth-json-rpc-middleware` → `^22.0.0`,
`@metamask/json-rpc-engine` → `^10.2.0`.
> - **Engine · TransactionController init
(`app/core/Engine/controllers/transaction-controller/transaction-controller-init.ts`)**:
> - Add compatibility handling/comments for `getNetworkState` due to
`NetworkStatus.Degraded` added in `@metamask/network-controller@v27`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
e08b54a. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: sethkfman <setk.kaufman@consensys.net>
Co-authored-by: Salah-Eddine Saakoun <salah-eddine.saakoun@consensys.net>
Co-authored-by: cryptodev-2s <109512101+cryptodev-2s@users.noreply.github.com>
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> Upgrade assets-controllers to start using Price API v3 spot-prices endpoint. ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: null ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-1575 ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [X] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [X] I've completed the PR template to the best of my ability - [X] I’ve included tests if applicable - [X] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [X] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Upgrades assets-controllers to v91 with Price API v3 changes and refactors app code to new token rates APIs and asset selectors, updating tests accordingly. > > - **Dependencies** > - Bump `@metamask/assets-controllers` to `v91.0.0` via Yarn patch; update `package.json` and `yarn.lock`. > - **Assets Controllers Patch** > - `dist/TokenBalancesController.{cjs,mjs}`: store balances under lower-cased `account` keys. > - `dist/token-prices-service/codefi-v2.cjs`: > - Add supported currency `mon`. > - Revise `SPOT_PRICES_SUPPORT_INFO` to `null` for many EVM chains (Price API v3 behavior). > - **App Integration** > - Replace `TokenRatesController.updateExchangeRatesByChainId` with `updateExchangeRates` across utils and tests (`refreshTokens`, `refreshEvmTokens`, `tokenRefreshUtils`, onboarding/tests). > - Refactor asset selectors in `selectors/assets/assets-list`: > - Introduce `getStateForAssetSelector` and simplify `selectAssetsBySelectedAccountGroup`. > - Remove `selectFilteredAssetsBySelectedAccountGroup`; adjust `selectTronResourcesBySelectedAccountGroup` to pull Tron resources without prior filtering. > - Update `useAccountTokens` hook and tests to new selector. > - `token-rates-controller-messenger`: narrow delegated actions/events to `TokensController:getState` and `NetworkController:getState` and their `stateChange` events. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 8e3ab80. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->
## Description
Bump Android e2e workflow runner size from `lg` to `xl` to prevent
Gradle Daemon disappearance issues caused by OOM in CI.
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry: null
## **Related issues**
Fixes:
## **Manual testing steps**
```gherkin
Feature: my feature name
Scenario: user [verb for user action]
Given [describe expected initial app state]
When user [verb for user action]
Then [describe expected outcome]
```
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<!-- [screenshots/recordings] -->
### **After**
<!-- [screenshots/recordings] -->
## **Pre-merge author checklist**
- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Increase GitHub Actions runner size for Android E2E build to 24.04-xl
to mitigate Gradle daemon OOM issues.
>
> - **CI/Workflows**:
> - Update `runs-on` image in `github/workflows/build-android-e2e.yml`
for job `build-android-apks` from
`ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg` to `24.04-xl`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
558a633. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description**
This PR removes a deprecated and unused version of
`TokenSelectModal.tsx` that was using the old `TokenIcon` component from
the Swaps folder.
**Reason for change:** The file was superseded by a newer implementation
(`TokenSelectModal/TokenSelectModal.tsx`) that properly uses the
`AvatarToken` component from the design system. The old file was not
imported or used anywhere in the codebase.
**Solution:** Deleted the deprecated standalone file to reduce code
maintenance burden and avoid confusion.
## **Changelog**
CHANGELOG entry: null
## **Related issues**
Fixes: N/A
## **Manual testing steps**
```gherkin
Feature: Token selection in Ramp
Scenario: user selects a token in the Ramp aggregator
Given the Ramp aggregator is open
When user taps on the token selector
Then the token selection modal opens with AvatarToken components displayed correctly
```
## **Screenshots/Recordings**
### **Before**
N/A - No user-facing changes.
### **After**
N/A - No user-facing changes.
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Remove unused/deprecated `TokenSelectModal.tsx` from Ramp Aggregator
components.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
1a2d696. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->
## **Description**
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry:
## **Related issues**
Fixes:
## **Manual testing steps**
```gherkin
Feature: my feature name
Scenario: user [verb for user action]
Given [describe expected initial app state]
When user [verb for user action]
Then [describe expected outcome]
```
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<!-- [screenshots/recordings] -->
### **After**
<!-- [screenshots/recordings] -->
## **Pre-merge author checklist**
- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Adds `startOffsetPercentage` to `Gestures.swipe()` and uses it in
network modal scrolling; conditionally enables the popular networks e2e
spec based on `MM_REMOVE_GLOBAL_NETWORK_SELECTOR`.
>
> - **e2e framework**:
> - **`Gestures.swipe()`**: Adds `startOffsetPercentage` option and
forwards `x/y` to underlying `el.swipe(...)`.
> - **Network modal**:
> - Uses `startOffsetPercentage` when swiping
`popularNetworksContainer`.
> - **Tests**:
> - Converts previously skipped "Add all popular networks" test to run
conditionally via `itif` based on `MM_REMOVE_GLOBAL_NETWORK_SELECTOR`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
6d60dfc. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->
## **Description**
Right now the results from trending returns the following data:
```
{
"assetId":"eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7",
"decimals":6,
"name":"Tether USD",
"symbol":"USDT"
}
```
This impacts the UI in the following way:
<img height="700" alt="image"
src="https://github.com/user-attachments/assets/19dd0865-55cc-4a45-9fe7-89476060dc47"
/>
As you can see the items returned from the search API do not have:
- volume
- market-cap
- price
- price change (24h)
I have modified:
- The search API
[here](consensys-vertical-apps/va-mmcx-token-api#194)
to return marketData optionally.
- Core [here](MetaMask/core#7226) to adopt this
new `includeMarketData` parameter
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry: get marketData on trending search request
## **Related issues**
Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-1834
## **Manual testing steps**
```gherkin
Feature: my feature name
Scenario: user [verb for user action]
Given [describe expected initial app state]
When user [verb for user action]
Then [describe expected outcome]
```
## **Screenshots/Recordings**
### **Before**
<img height="700" alt="image"
src="https://github.com/user-attachments/assets/19dd0865-55cc-4a45-9fe7-89476060dc47"
/>
### **After**
<img height="700" alt="image"
src="https://github.com/user-attachments/assets/b79e4ce8-153a-49ab-9402-187b79b6f2b6"
/>
## **Pre-merge author checklist**
- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Integrates market data from token search into trending results, adds
robust typing and stale-request handling in hooks, and updates tests and
section config accordingly.
>
> - **Trending/Search Hooks**:
> - **`useSearchRequest`**: Adds typed `SearchResult` with market data
fields; returns typed results; improves loading/error handling; prevents
stale overwrites via request IDs; skips calls and clears results on
empty queries; stabilizes `chainIds` to avoid redundant fetches.
> - **`useTrendingSearch`**: Merges search results into trending tokens,
mapping market data and 24h price change (`pricePercentChange1d` ->
`priceChangePct.h24`); deduplicates by `assetId`; maintains sort and
loading behavior.
> - **Tests**:
> - Expand unit tests for success/error states, manual retry, empty
query behavior, stale request protection, param-change triggering, and
stable `chainIds` reference; add helpers and correct typing.
> - **Sections Config**:
> - Updates `useSectionData` `refetch` type to allow `Promise<void> |
void`; simplifies `SectionData` to `data` and `isLoading`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
2bc3dea. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
#23425) <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ### **Description** Subscribe to `NetworkController:rpcEndpointChainAvailable` event to immediately hide the network connection banner when a network becomes available again, instead of relying solely on periodic timeout checks. ### Changes - Subscribe to `NetworkController:rpcEndpointChainAvailable` event in `useNetworkConnectionBanner` hook - Hide banner when event fires for matching `chainId` ## Behavior The banner now hides instantly when: - The event fires for a network that became available - The `chainId` matches the currently displayed banner - The banner is currently visible <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: Network connection banner now hides immediately when network becomes available again ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > <sup>[Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) is generating a summary for commit 08a9ff8. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
## **Description** Adds logic to filter and gracefully handle unsupported notifications (e.g. notifications we have not added, or notification chains that are not supported). There are 2 future iterations that we may be doing for wallet notifications: 1. Make our server provide this missing data, this way we do not need to rely on eng effort to maintain hardcoded constants in the client. 2. Fully remove the wallet notifications from inside the notifications list. As mentioned before this is a duplicate of the transaction activity tab, so we should unify these 2 lists. ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 3. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: fix: filter and handle unsupported notifications ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-1839 ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Filters out invalid/unsupported notifications (incl. ETH/ERC20 on unsupported chains) and prevents rendering list items and details for them, with tests added/updated. > > - **Notifications framework**: > - Add `isValidNotificationComponent` to validate notifications before use. > - Allow multiple guards in `NotificationState.guardFn` (array support). > - Update `eth-sent-received` and `erc20-sent-received` states to guard by supported `chain_id` via `getNativeTokenDetailsByChainId`. > - **UI**: > - `NotificationsListItem` uses `isValidNotificationComponent`; returns `null` for invalid/unsupported notifications. > - Refactor `NotificationsDetails` container to compute state upfront, validate with `isValidNotificationComponent`, and return `null` when invalid; add `testID` on root. > - **Tests**: > - Add tests to ensure ETH/ERC20 notifications with unsupported `chain_id` are filtered from list and details. > - Add/adjust unit tests for `isValidNotificationComponent`, list states, and details; remove outdated snapshot. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit b5e28cc. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
…3423) ## **Description** Push Notification Click analytics are missing because the new Generic Platform Notifications does not hold any data or metadata. This is a pre-emptive fix so that: 1. We always emit a push notification click event (we can capture events that are missing data) 2. Pre-emptively add support for the data and metadata fields for when our backend adds these to push notifications and in-app notifications. ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: fix: resolve missing push notification analytics events ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-1870 ## **Manual testing steps** 1. Receive a push notification for perps. 2. Click on push notification 3. Inpsect segment and mixpanel to see if these events are coming through. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Always emit push notification click analytics and parse both on-chain `data` and platform `metadata` to populate event properties. > > - **Analytics/Notifications**: > - Always emit `PUSH_NOTIFICATION_CLICKED` via `analyticsTrackPushClickEvent` with optional properties. > - Parse on-chain notifications from `remoteMessage.data.data` and platform notifications from `remoteMessage.data.metadata`. > - Derive `notification_type` from multiple fields (`payload.data.kind`, `type`, `notification_type`) and include `deeplink` when present. > - **Tests**: > - Update closed/suspended app tests to validate parsing from `metadata`, expected `notification_type`, and `data` payload. > - Assert event is tracked even when notification is null (no additional properties). > - Add `createMockPlatformMetaData` helper for test payloads. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 44fbcca. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** Created the following predict row item component for the trending page: <img width="353" height="220" alt="image" src="https://github.com/user-attachments/assets/8aca29c0-7032-4f08-8585-3b648dc7b6ad" /> <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: added new simplified predict market row item for trending ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-1855 ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** https://github.com/user-attachments/assets/40c4cf0f-491e-49c8-a556-f91e91fe000f <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Introduces a new lightweight `PredictMarketRowItem` for search results, wires it into Trending sections, adds a `TRENDING_SEARCH` entry point, and standardizes token/site icon skeletons to 40px with adjusted loading counts. > > - **Predictions**: > - **New `PredictMarketRowItem`** (`PredictMarketRowItem.tsx/.styles.ts/index.ts`): > - Shows market title and top open outcome probability (formatted, truncated; handles edge cases and missing images). > - Navigates to `PredictMarketDetails` with `entryPoint` (default `TRENDING_SEARCH`). > - Comprehensive tests added. > - **Analytics/Types**: Add `PredictEventValues.ENTRY_POINT.TRENDING_SEARCH` and extend `PredictEntryPoint`. > - **Integration**: Use `PredictMarketRowItem` for search results via `OverrideRowItemSearch` in `sections.config.tsx` and render path in `ExploreSearchResults`. > - **Trending Tokens/Sites UI**: > - Standardize logo/skeleton size to `40` (was `44`) in `TrendingTokenRowItem`, `TrendingTokensSkeleton`, and `SiteSkeleton`; update tests. > - Remove `iconSize` prop from `TrendingTokenRowItem` and hardcode `size={40}`. > - Increase loading placeholders: Sites Full View `10→15`, Trending Tokens Full View `10→12`; update tests. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 8410f1e. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )